<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
   <title>Document</title>
</head>
<body>
   <script>
      var arr = [1,1,3,3,4,5,5,6,7,8,8];
      var res = [];
      arr.reduce(function(prev,index){
         for(var i=0;i<arr.length;i++){
            if(res.indexOf(arr[i]) === -1){
               res.push(arr[i]);
            }
         }
         return res;
      })
      console.log(res);
   </script>
</body>
</html>